package cn.waqwb;

import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.net.URL;
import java.util.Properties;

public class test {
    public static void main(String[] args) throws Exception{
        //JDBC jdbc = new MYSQL();
        //JDBC jdbc = new Oracle();
        //JDBC jdbc = new DB2();
        //Class c = Class.forName("cn.waqwb.Oracle");
        //JDBC jdbc = (JDBC)c.newInstance();
        //jdbc.getConnection();
        InputStream is = test.class.getClassLoader().getResourceAsStream("jdbc.properties");
        Properties pros = new Properties();
        pros.load(is);
        String className = pros.getProperty("className");
        System.out.println(className);
        Class c = Class.forName(className);
        JDBC jdbc = (JDBC)c.newInstance();
        jdbc.getConnection();
    }
}
